home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000012_squares@shaw.ca_Wed Apr 23 09:00:16 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  5KB  |  144 lines

  1. Article: 14228 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news3.calgary.shaw.ca.POSTED!not-for-mail
  3. X-Trace-PostClient-IP: 24.68.68.120
  4. From: "Will Martin" <squares@shaw.ca>
  5. Newsgroups: comp.protocols.kermit.misc
  6. Subject: File Transfer as Backup from Xenix 2.3.4 to WinOS
  7. Lines: 123
  8. X-Priority: 3
  9. X-MSMail-Priority: Normal
  10. X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
  11. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
  12. Message-ID: <ofnpa.182462$vs.18609662@news3.calgary.shaw.ca>
  13. Date: Wed, 23 Apr 2003 02:54:12 GMT
  14. NNTP-Posting-Host: 24.69.255.232
  15. X-Complaints-To: abuse@shaw.ca
  16. X-Trace: news3.calgary.shaw.ca 1051066452 24.69.255.232 (Tue, 22 Apr 2003 20:54:12 MDT)
  17. NNTP-Posting-Date: Tue, 22 Apr 2003 20:54:12 MDT
  18. Organization: Shaw Residential Internet
  19. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14228
  20.  
  21. I'm new to Kermit and would appreciate some assistance with the following
  22. problem:
  23.  
  24. We have a Xenix 2.3.4 box that I need to backup files off of onto the NT
  25. network. Files are regularly created, changed, or deleted from the data
  26. areas. The Xenix box is date-windowed as well, so some files have current
  27. year, some current -28.
  28.  
  29. I've written a xenix script to create a file listing, then use the following
  30. listing to loop through the file listing. The kermit scripts are running on
  31. the Xenix box.
  32.  
  33.     Set file names literal
  34.     Set file collision backup
  35.     Set send pathname relative
  36.     ; Open the file listing
  37.     open read xenixfilelist
  38.     xif fail {
  39.          open read XENIXFILELIST
  40.          xif fail {
  41.          echo File list not found
  42.          stop
  43.          }
  44.     }
  45.     ; Read first item and begin testing variable
  46.     read line
  47.     define \%a ./
  48.     define \%b ../
  49.     define \%c /
  50.     define \%d :
  51.     define \%e NOTASSIGNED
  52.     define \%z \v(date)
  53.     define CurDir .
  54.  
  55.     ; Enter loop to check listing entry
  56.     while success {
  57.      assign \%e Blank
  58.      take kermlnset.txt
  59.      read line
  60.     }
  61.     close read-file
  62.  
  63. The following file checks each file listing line to determine if it's a file
  64. and appends the correct path to the filename.
  65.  
  66.     define \%h \fsubstring(\m(line),1,\flength(\m(line))-1)
  67.     if = \flength(\m(line)) 0 GOTO ZERLEN
  68.     if equal \m(line) \%a GOTO DIRTOP
  69.     if equal \m(line) \%b Goto DIRSUB
  70.     define \%g \Frindex(\%d, \m(line),1)
  71.     if > \%g 0 GOTO DirChg
  72.     define \%f \Frindex(\%c, \m(line),1)
  73.     if > \%f 0 GOTO FinChar
  74.     define \%e FIL
  75.     goto DONE
  76.     :DIRTOP
  77.          define \%e TOP
  78.          goto DONE
  79.     :DIRSUB
  80.          define \%e SUB
  81.          goto DONE
  82.     :ZERLEN
  83.          define \%e ZER
  84.          goto DONE
  85.     :FinCHAR
  86.          define \%e SLS
  87.          goto DONE
  88.     :DirChg
  89.          assign CurDir \%h
  90.          define \%e COL
  91.          goto DONE
  92.     :DONE
  93.          define \%i \m(CurDir)/\m(line)  ; Path and file name of current
  94. item
  95.          define \%j None    ; Define empty field
  96.          define \%k 0    ; Define empty date field
  97.          if exist \%i {    ; If the file exists
  98.               define \%j Found FILE  ; report that file is found
  99.               define \%k \Fdate(\%i)  ; determine the file modification
  100.               }      ; date and store to variable
  101.          if equal \%e FIL {   ; If the item is a file
  102.               define \%l \fmjd(\%z)  ;  Store today as julian
  103.               define \%m \fmjd(\%k)  ; Store file date as julian
  104.           if < \%m \%l {   ; If file date < today         ** as the Xenix
  105. box is date windowed, today returns 1975 as the year.....
  106.                echo \%i \%j
  107.                remote set file collision backup
  108.                send \%i
  109.           } else {
  110.                echo \%i \%j
  111.                remote set file collision update
  112.                send \%i
  113.           }
  114.      }
  115.      end
  116.  
  117. Based on the date of the file I need to ensure the update to the NT system
  118. is accurate; all of the files affected by date windowing are not updating to
  119. the NT box with the date from the Xenix system. The above script simply
  120. tries to set file collision to "backup" for any files whose year is less
  121. than the date windowed year, and to update for all others.
  122.  
  123. The problems at this time:
  124. 1.    For "remote set file collision update" I receive an invalid set
  125. parameter message.
  126. 2.    The receiving system is not getting the date attribute correctly; the
  127. date windowed files are all being received as current year, which prevents
  128. simply updating them.
  129. 3. I'm not familiar enough with file/date manipulation to change the file
  130. creation date in Xenix through kermit. This would be a clean solution. I
  131. have read many sections of "Using C-Kermit"  and the varied and plentiful
  132. addenda available on the columbia site.
  133. 4. My lack of learning time at this date, and the robust nature of kermit,
  134. tell me that I've not found the best solution to this mishmash.
  135.  
  136. Any assistance that can be provided is appreciated.
  137.  
  138. Thanks,
  139.  
  140. Will Martin
  141. will_m@novax.com
  142.  
  143.  
  144.